<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>工作人员管理</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link href="css/bootstrap.css" rel="stylesheet" media="screen">

		<style type="text/css">
			.pagination a {
				cursor: pointer;
				text-decoration: none;
				color: dodgerblue;
			}
		</style>
	</head>

	<body>

		<article class="container-fluid">

			<section class="row-fluid">
				<ul class="breadcrumb">
					<li>
						<a href="#">主页</a><span class="divider">/</span></li>
					<li>
						<a href="#">系统设置</a><span class="divider">/</span></li>
					<li class="active">工作人员管理</li>
				</ul>
			</section>

			<section class="row-fluid">

				<form class="form-search" @submit.prevent="submit">
					<input class="input-medium search-query" v-model="params.key" type="text" />
					<button type="submit" class="btn">查找</button>
				</form>

				<button><a href="addstaff.html">新增员工</a></button>
				
			</section>

			<section class="row-fluid">

				<table class="table">
					<thead>
						<tr>
							<th><input type="checkbox">序号</th>
							<th>姓名</th>
							<th>性别</th>
							<th>出生日期</th>
							<th>员工编号</th>
							<th>员工类别</th>
							<th>入职时间</th>
							<th>创建人</th>
							<th>职称</th>
							<th>人员状态</th>
							<th>备注</th>
							<th>详情</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody v-if="result!=null">
						<tr v-for="(r,i) of result.rows">
							<td><input type="checkbox">{{i+1}}</td>
							<td>{{r.name}}</td>
							<td>{{r.male}}</td>
							<td>{{r.birthday}}</td>
							<td>{{r.no}}</td>
							<td>{{r.role}}</td>
							<td>{{r.employedDate}}</td>
							<td>{{r.createUserId}}</td>
							<td>{{r.title}}</td>
							<td>{{r.flag}}</td>
							<td>{{r.remark}}</td>
							<td><a :href="r.introUrl">查看详情</a></td>
							<td><button><a :href="'modstaff.html#'+r.id">查看</a></button></td>
						</tr>
					</tbody>
					<tbody v-if="result!=null&&result.totalRows==0">
						<tr>
							<td colspan="99">抱歉，未找到相关数据</td>

						</tr>
					</tbody>
				</table>
			</section>

			<section class="row-fluid" v-if="result!=null&&result.totalRows>0">
				<div class="span7">
					<div>
						<span>共<b>{{result.totalRows}}</b>条记录</span>
						<span>每页<b>{{result.pageSize}}</b>条</span>
						<span>共<b>{{result.totalPages}}</b>页</span>
					</div>
				</div>
				<div class="span5">
					<div class="pagination">
						<ul>
							<li v-if="result.pageNo!=1">
								<a @click.prevent="params.pageNo-=1">上一页</a>
							</li>
							<li v-if="result.pageNo>2">
								<a @click.prevent="params.pageNo-=2">{{result.pageNo-2}}</a>
							</li>
							<li v-if="result.pageNo>1">
								<a @click.prevent="params.pageNo-=1">{{result.pageNo-1}}</a>
							</li>
							<li>
								<a href="#">{{result.pageNo}}</a>
							</li>
							<li v-if="result.pageNo+1<result.totalPages">
								<a @click.prevent="params.pageNo+=1">{{result.pageNo+1}}</a>
							</li>
							<li v-if="result.pageNo+2<result.totalPages">
								<a @click.prevent="params.pageNo+=2">{{result.pageNo+2}}</a>
							</li>
							<li v-if="result.pageNo<result.totalPages">
								<a @click.prevent="params.pageNo+=1">下一页</a>
							</li>
						</ul>
					</div>
				</div>
			</section>
		</article>
		<script src="js/jquery.js"></script>
		<script src="js/vue.js"></script>
		<script src="js/axios.js"></script>
		<script src="js/yi.toast.js"></script>
		<script src="js/staff.js"></script>
		<script src="js/bootstrap.js"></script>
	</body>

</html>